package org.jadapter.tests;

import static org.junit.Assert.assertEquals;

import java.util.Map;

import org.jadapter.adapters.AutoConfigAdapter;
import org.jadapter.tests.examples.ConstructorAdapter;
import org.jadapter.tests.examples.Csv;
import org.junit.Test;

public class TestAutoConfigAdapter {
    
    @Test public void shouldResolveTypeInformation() {
        AutoConfigAdapter<Csv, Map> adapter = 
            new AutoConfigAdapter<Csv, Map>(ConstructorAdapter.class){
                public Csv transform(Map context) {
                    return null;
                }            
        };
        
        assertEquals(Csv.class, adapter.to());
        assertEquals(Map.class, adapter.from());

    }

}
